﻿{extend name="public:base" /}

{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <div class="row search-form">
                        <div id="ID-laydate-range" class="row col-sm-4 m-b-sm">
                            <div class="col-sm-6 m-b-sm">
                                <div class="input-group">
                                    <input placeholder="请选择开始日期" type="text" autocomplete="off" name="start_date" id="start_date" value="{:input('start_date')}" class="form-control form-control-lg" readonly>
                                </div>
                            </div>
                            <div class="col-sm-6 m-b-sm">
                                <div class="input-group">
                                    <input placeholder="请选择结束日期" type="text" autocomplete="off" name="end_date" id="end_date" value="{:input('end_date')}" class="form-control form-control-lg" readonly>
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>

                    <style>
                        .status-box {
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                            margin-bottom: 20px;
                            width: 26%;
                        }

                        .status-item {
                            padding: 5px 22px;
                            border-radius: 5px;
                            cursor: pointer;
                        }

                        .active{
                            background-color: #1ab394;
                            color: #fff;
                        }
                    </style>

                    <div class="status-box">
                        <div class="status-item active" data-status="0">全部</div>
                        <div class="status-item" data-status="1">充值记录</div>
                        <div class="status-item" data-status="2">拨付记录</div>
                        <div class="status-item" data-status="3">来账记录</div>
                    </div>

                    <div class="hr-line-solid"></div>

                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>操作时间</th>
                                <th>操作人</th>
                                <th>类型</th>
                                <th>IP地址</th>
                                <th>描述</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.create_time|timeFormat}</td>
                                <td>{$vo.user_id|getUsername}</td>
                                <td>{$vo.type|doOperationType}</td>
                                <td>{$vo.ip}</td>
                                <td>{$vo.description}</td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name="js"}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.screen-date', //指定元素
        format: 'yyyy-MM-dd',
        range: true
    });
    laydate.render({
        elem: '#ID-laydate-range',
        range: ['#start_date', '#end_date']
    });
{/block}
